<template>
  <div class="home">
    <!-- 
      动态路由 就是路由的一部分地址可以写成一个动态的数据
     -->
     <!-- <router-link to="/about/aaa">进入about页面</router-link> -->
    <router-link v-for="(item, i) in goods" :key="item.id" :to="'/about/' + item.id">{{item.name}}</router-link>
  </div>
</template>

<script>

export default {
  name: 'Home',
  data() {
    return {
      goods: [
        {
          name: "螳螂",
          price: 6300,
          id: 1
        },
        {
          name: "劫",
          price: 6300,
          id: 2
        },
        {
          name: "泰隆",
          price: 6300,
          id: 3
        },
        {
          name: "卡牌",
          price: 6300,
          id: 4
        }
      ],
      current: 0
    }
    
  }
}
</script>
